<template>
  <div class="adjustPost">
    <el-card>
      <template #header>
        <el-breadcrumb separator="/">
          <el-breadcrumb-item :to="'/'">首页</el-breadcrumb-item>
          <el-breadcrumb-item :to="'/employees'">员工管理</el-breadcrumb-item>
          <el-breadcrumb-item>调岗</el-breadcrumb-item>
        </el-breadcrumb>
      </template>
      <User :userInfo="userInfo" style="margin-left:100px"></User>
      <hr />
      <el-form>
        <el-form-item>
          <el-row>
            <el-col :span="12" style="padding-left:100px">岗位:</el-col>
            <el-col :span="1">
              <i class=" el-icon-right arrow"></i>
            </el-col>
            <el-col :span="11">
              <el-input class="input"></el-input>
            </el-col>
          </el-row>
        </el-form-item>
        <el-form-item>
          <el-row>
            <el-col :span="12" style="padding-left:100px">岗位:</el-col>
            <el-col :span="1">
              <i class=" el-icon-right arrow"></i>
            </el-col>
            <el-col :span="11">
              <el-input class="input"></el-input>
            </el-col>
          </el-row>
        </el-form-item>
        <el-form-item>
          <el-row>
            <el-col :span="12" style="padding-left:100px">岗位:</el-col>
            <el-col :span="1">
              <i class=" el-icon-right arrow"></i>
            </el-col>
            <el-col :span="11">
              <el-select class="select"></el-select>
            </el-col>
          </el-row>
        </el-form-item>
        <el-form-item>
          <el-row>
            <el-col :span="24" style="padding-left:100px">
              <span class="date">调岗时间:</span>
              <el-date-picker></el-date-picker
            ></el-col>
          </el-row>
        </el-form-item>
        <el-form-item>
          <el-row>
            <el-col :span="12" style="padding-left:100px">岗位:</el-col>
            <el-col :span="1">
              <i class=" el-icon-right arrow"></i>
            </el-col>
            <el-col :span="11">
              <el-date-picker></el-date-picker>
            </el-col>
          </el-row>
        </el-form-item>
        <el-form-item>
          <div style="text-align:center">
            <el-button type="primary">提交</el-button>
            <el-button type="txt">返回</el-button>
          </div>
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>

<script>
import { sysUser } from '@/api/user'
import { employeesTransferPosition } from '@/api/employees'
export default {
  data () {
    return {
      id: this.$route.params.id,
      userInfo: ''
    }
  },
  created () {
    this.getData()
  },
  methods: {
    async getData () {
      const result = await sysUser(this.id)
      this.userInfo = result.data
      const res = await employeesTransferPosition(this.id)
      console.log('员工调岗信息', res)
    }
  }
}
</script>

<style lang="scss" scoped>
.el-input {
  ::v-deep .el-input__inner {
    width: 50%;
  }
}
.date {
  margin-right: 10px;
}
::v-deep .el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 400px;
}
</style>
